﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLNhaThuoc.DAL;
using QLNhaThuoc.DTO;

namespace QLNhaThuoc.BL
{
    public class HoaDonControl
    {
        HoaDonDA hoaDonDA = new HoaDonDA();

        public HoaDon[] LayListHoaDon()
        {
            return hoaDonDA.LayListHoaDon();
        }

        public void ThemHD(HoaDon info)
        {
            hoaDonDA.insert(info);
        }

        public void XoaHD(HoaDon info)
        {
            hoaDonDA.delete(info);
        }

        public void CapNhatHD(HoaDon info)
        {
            hoaDonDA.update(info);
        }

        public bool KiemTraPK(HoaDon info)
        {
            return hoaDonDA.KiemTraPK(info);
        }

        public HoaDon[] TimKiem(string expr)
        {
            return hoaDonDA.search(expr);
        }
    }
}
